# ifndef __DDBitmap_H_
# define __DDBitmap_H_

# include "Bitmap.h"

	//
	// Device-dependent bitmap.
	//

class CDDBitmap : public CBitmap {
  public:
	CDDBitmap (HDC _hMemDC, HBITMAP _hBitmap, long _lWidth, long _lHeight) :
		CBitmap (_lWidth, _lHeight),
		m_hBitmap (_hBitmap),
		m_hMemDC (_hMemDC)
	{}
	CDDBitmap (long _lWidth, long _lHeight);
	~CDDBitmap ();

	HDC GetDC () const {return m_hMemDC;}
	HBITMAP GetBitmap () const {return m_hBitmap;}

	// Override.
	virtual BOOL StretchBlt (
		HDC _hdcDest,
		int _xDest, int _yDest, int _wDest, int _hDest,
		int _xSrc,  int _ySrc,  int _wSrc,  int _hSrc,
		DWORD _dwRop = SRCCOPY
	) const {
		return ::StretchBlt (
			_hdcDest, _xDest, _yDest, _wDest, _hDest,
			m_hMemDC, _xSrc,  _ySrc,  _wSrc,  _hSrc,
			_dwRop
		);
	}

	virtual BOOL AlphaBlend (
		HDC _hdcDest,
		int _xDest, int _yDest, int _wDest, int _hDest,
		int _xSrc,  int _ySrc,  int _wSrc,  int _hSrc,
		BYTE _SourceConstantAlpha
	) const;

	virtual CBitmap * MakeSmall () const;

  private:
	HBITMAP m_hBitmap;
	HDC     m_hMemDC;
};

# endif // __DDBitmap_H_